home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / storm100.lzh / BASIC.DOC next >
Text File  |  1993-11-03  |  68KB  |  1,934 lines

  1.             Basic language overview
  2.  
  3. This document assumes you are already familiar with the Basic language. Its 
  4. purpose is to explain the special features of Storm Basic.
  5.  
  6. Storm Basic is a Basic language interpreter with extensions to handle the 
  7. serial port, file transfer, and other Storm functions. It does not have 
  8. floating point or graphics features.
  9.  
  10. Variables:
  11.  
  12. You can only have 128 total variables. There is no fixed limit on the length of 
  13. a variable name, as long as it fits on a single line. Upper and lower case ARE 
  14. significant in variable names.
  15.  
  16. You can use the same variable name for an integer, an integer array, a string, 
  17. and a string array. e.g. in:
  18.  
  19. DIM x(10),x$(10)
  20. x = LEN(x$)
  21.  
  22. there are actually four separate variables.
  23.  
  24. Math functions:
  25.  
  26. The usual math operations are supported. e.g. addition, subtraction, 
  27. multiplication, division and MOD (modulus function) and the Boolean functions 
  28. XOR, NOT, AND and OR. The comparision operators >, <, >=, <= and <> are 
  29. supported. In accordance with typical Basic practice, TRUE is -1 and FALSE is 0.
  30.  
  31. Arrays:
  32.  
  33. Each element of an array, whether string or integer, requires four bytes of 
  34. overhead. The maximum array space available is 64K. That means that the maximum 
  35. number of array elements is limited to a combined total of 16384. Arrays can 
  36. have one or two dimensions only. Trying to dimension more than two array 
  37. dimensions will cause a syntax error.
  38.  
  39. Memory:
  40.  
  41. Basic allocates memory as required and releases it when no longer required. 
  42. Each Basic string or element of a string array is allocated separately and can 
  43. be up to 64K long. The total amount of string memory is limited to 
  44. approximately 638K, which should be enough for even the most demanding programs.
  45.  
  46. The total size of a Basic program is limited only by available memory. However, 
  47. the total number of lines in a program must not exceed 64K.
  48.  
  49. Labels
  50.  
  51. There are no line numbers in Storm Basic. You can use line numbers if you wish, 
  52. but they are treated as labels, which means they don't have to be in numeric 
  53. order. Labels must be at the beginning of a line and are followed immediately 
  54. by a colon ':' (except if the label consists entirely of digits). Not 
  55. surprisingly, a label cannot be a Basic command, however Basic can distinguish 
  56. a label such as GOTOX from the Basic statement GOTO X, which must contain a 
  57. space between the GOTO and the X.
  58.  
  59. You can indent lines and the indentation will be preserved. If you wish to 
  60. indent a line starting with a label, add spaces AFTER the label. All spaces 
  61. appearing before a label are automatically removed.
  62.  
  63. Labels normally start with a letter, and contain letters, digits, or the 
  64. underscore character. An exception is line numbers, which don't require a colon 
  65. and are treated in all other respects as labels. Upper and lower case are 
  66. significant in labels, and labels may not be longer than 31 characters.
  67.  
  68. Loading and saving Basic programs
  69.  
  70. Basic programs can be loaded and saved in two formats, Ascii or tokenized. 
  71. Tokenized format is compressed and loads faster. However, if I add or change 
  72. commands in Storm Basic the token numbers change and a new version will not be 
  73. able to load old version tokenized files.
  74.  
  75. "Save" in the Basic menu or as a Basic command saves in tokenized format. To 
  76. save in Ascii format either use the Basic command LIST "Filename" or select 
  77. "Save" from the File menu WHEN IN THE BASIC EDITOR ONLY. "Load" as a Basic 
  78. command, or from the Basic menu will load either type of Basic file.
  79.  
  80. Editing your Basic program.
  81.  
  82. To edit a Basic program just select "Edit" from the Basic menu. A new editing 
  83. window will be created with the program currently in memory
  84. displayed there. If there is no program loaded, you will get a blank
  85. editing window to create a new program. The editing window is a full text
  86. editor. You can load, save, and cut and paste to the clipboard. Note: Use
  87. the File menu Load and Save while in the Basic editor, not the Basic menu
  88. Load and Save (they only load and save to the Basic interpreter, not the
  89. Basic editor).
  90.  
  91. When you have finished editing the Basic program you have two choices.
  92. Clicking on the close box of the Basic editor window will reload the
  93. program into the Basic interpreter. Any syntax errors will be flagged at
  94. this time. Or, you can select "Abort Edit" from the Basic menu and the
  95. editing window will be closed and the program in the Basic interpreter
  96. will not be updated.
  97.  
  98. The Basic editor will NOT detect errors as you enter code, only when you
  99. close the window and transfer the program back to the Basic interpreter.
  100.  
  101. While you are editing the Basic program, you can still use the Basic
  102. interpreter to run programs, or even load and run new program. However,
  103. when you close the Basic editing window, any program in the interpreter
  104. will be halted and replaced with the program in the Basic editing window.
  105.  
  106. Syntax errors:
  107.  
  108. Syntax errors will indicate a line number. In this context, the program is
  109. numbered internally starting with line 1. So if you get syntax errors and
  110. move to the editing window, refer to the line number in the information
  111. line to see which line of code generated the error.
  112.  
  113. AUTOEXEC.BAS
  114.  
  115. When Storm first runs, it looks for a file named AUTOEXEC.BAS in the
  116. current directory (the one that Storm was run from). If found, this Basic
  117. program automatically loads and runs.
  118.  
  119. =============================================================
  120.  
  121. Basic Commands
  122.  
  123. ABORT XFER
  124.  
  125. Aborts a file transfer, if one is in progress.
  126.  
  127. APPEND CAPTURE
  128.  
  129. APPEND CAPTURE "filename" appends the capture buffer to the specified file.
  130.  
  131. BAUD nn
  132.  
  133. Sets baud rate to value nn, where nn is a valid baud rate value.
  134. (Range 50 to 19200)
  135.  
  136.  
  137. BREAK ON
  138. BREAK OFF
  139. BREAK /
  140.  
  141. These commands set the hardware break bit in the serial port. To send a
  142. break, use BREAK ON:PAUSE 0:BREAK OFF. Use a longer pause for a longer
  143. break.
  144.  
  145. To program this into a Storm function key as shift clr/home, add the following 
  146. to the STORMKEY.INI file.
  147.  
  148. [34737]
  149. UseBasic=1
  150. Key="BREAK ON:PAUSE 0:BREAK OFF:END"
  151.  
  152. If you find the break is not recognized, try a longer pause, e.g.
  153. Key="BREAK ON:PAUSE 1:BREAK OFF:END"
  154.  
  155.  
  156.     This function works on all TT, MegaSTE and Falcon serial ports.
  157.  
  158. CAPTURE ON
  159. CAPTURE OFF
  160. Turn text capture on or off.
  161.  
  162.  
  163. CAPTURE /
  164. Toggle text capture from on to off or vice versa.
  165.  
  166.  
  167. CARRIER ON
  168. CARRIER OFF
  169. CARRIER CLEAR
  170.  
  171. Enables or disables carrier detect event trapping, or removes a carrier
  172. event trap entirely. This function works on all TT, MegaSTE and Falcon serial
  173. ports. Event trapping is discussed in full elsewhere.
  174.  
  175.  
  176. CD "path"
  177.  
  178. Sets default path to "path". "path" can be a simple quoted string or
  179. any Basic string expression. This is generally used in conjunction with the
  180. Basic DIR, KILL and other statements which access the file system and would
  181. otherwise require a full filename. Path should end with a backslash '\'.
  182.  
  183.  
  184. CHAIN
  185. CHAIN "filename"
  186.  
  187. Basic allows chaining to a new copy of the Basic interpreter. You can
  188. also specify an optional Basic file to be executed in the new interpeter.
  189. When you execute the CHAIN command, the currently running Basic program is
  190. suspended and the newly created Basic interpeter starts running. You will
  191. see that the Basic window title changes to reflect the level of chaining,
  192. e.g. Basic <2>, Basic <3>, etc.
  193.  
  194. To exit to the previous Basic, it is only necessary to execute the END
  195. command. The program will continue with the statement following the CHAIN
  196. command.
  197.  
  198. The level of chaining is only limited by available memory. Each new Basic
  199. interpreter has less than 1K of memory overhead.
  200.  
  201. It is not possible to share variables between the original Basic
  202. interpreter and a chained Basic. However, you can use the Basic SET
  203. statement in combination with the SET$ and SET functions to save and
  204. retrieve numbers and strings in the STORM.INI and other profile files.
  205.  
  206.  
  207. CLIP ON
  208. CLIP OFF
  209. CLIP STOP
  210. CLIP CLEAR
  211.  
  212. Enables or disabled clipboard event trapping, or removes a clipboard event
  213. trap entirely. Clipboard event trapping is described elsewhere.
  214.  
  215.  
  216. CLOSE #n
  217.  
  218. Closes a file previously opened with the OPEN statement. Attempts to
  219. close a file twice or using an invalid file number will not cause an
  220. error, they will just be ignored.
  221.  
  222.  
  223. CLR
  224.  
  225. Sets all integer variables to zero, undimensions all arrays, and frees all
  226. Basic strings.
  227.  
  228.  
  229. CLS
  230.  
  231. Clears the Basic window.
  232.  
  233.  
  234. COM ON
  235. COM OFF
  236. COM STOP
  237. COM CLEAR
  238.  
  239. Enables or disabled serial port event trapping, or removes a serial port
  240. event trap entirely. Serial port event trapping is described elsewhere.
  241.  
  242.  
  243. COMINPUT var$
  244. COMINPUT var$,FULL
  245. COMINPUT var$,HALF
  246.  
  247. COMINPUT is used to read data from the serial port into a string variable.
  248. All available data (up to a maximum of 256 characters) is read into the
  249. string variable. If no serial data is present, the variable is set to an
  250. empty string.
  251.  
  252. By default, serial data read using this command is not displayed on the
  253. terminal screen. The optional parameter "HALF" causes serial input to be
  254. echoed to the terminal screen. The optional parameter "FULL" causes both
  255. echo to the terminal screen AND echo back to the sender. Do NOT have half
  256. duplex set when using "FULL" or you may get stuck in an infinite loop!
  257.  
  258. In order to use this command, you must specify TERM OFF beforehand or else
  259. the regular terminal routines will steal some of the characters.
  260.  
  261.  
  262. CONT
  263.  
  264. Continues execution of a Basic program that has been interrupted either
  265. with the STOP command or the UNDO key or the Basic menu "Break" item.
  266.  
  267.  
  268. DATA
  269.  
  270. Used at the start of a statement to indicate Basic Data items. Data items
  271. can consist of numbers or strings, separated by commas. Strings which
  272. contain leading or trailing blank spaces, commas, or colons should be in
  273. double quote marks. Basic will actually add double quote marks to all
  274. strings in data statements automatically. Data statements can be mixed with
  275. other statements by separating the Data statement from the next statement
  276. with a colon. However, it is more efficient to group data statements
  277. together.
  278.  
  279.  
  280. DIM
  281. Allows dimensioning of Basic arrays, e.g. DIM x(2),a$(2) defines two
  282. arrays, one integer and one string. The number inside the bracket is the
  283. maximum array index. Since arrays start at element zero, a value of two
  284. means a total of three elements in the array. Basic allows integer or
  285. string arrays. The maximum number of arrays dimensions is two.
  286.  
  287. Arrays may not be redimensioned. However, you can use a variable or
  288. expression to dimension an array. e.g. DIM x(a+b-1).
  289.  
  290.  
  291. DIR
  292. DIR "string"
  293.  
  294. Prints out the files in the current directory (set by CD). An optional
  295. string lets you restrict the file listing using wildcards. e.g. DIR
  296. "*.PRG" will list all files ending in ".PRG". To get a directory listing
  297. into Basic string variables, you need to use the FSFIRST$ and FSNEXT$
  298. functions rather than DIR.
  299.  
  300.  
  301. DTR ON
  302. DTR OFF
  303.  
  304. Turns the DTR signal line in the serial port on or off. Useful for forcing
  305. a modem to disconnect.
  306.  
  307. DTR stands for Data Terminal Ready. Most modems require DTR to be on
  308. before they will operate. It is possible to defeat this feature in most
  309. modems and ignore the state of the DTR line.
  310.  
  311. This function works on all TT, MegaSTE and Falcon serial ports except for
  312. the TT Serial 1 port, due to lack of documentation.
  313.  
  314. Example: To force a modem to disconnect, turn DTR off, pause briefly, then
  315. turn DTR back on again.
  316.  
  317.     DTR OFF
  318.     PAUSE 2
  319.     DTR ON
  320.  
  321.  
  322. DUPLEX FULL
  323. DUPLEX HALF
  324. DUPLEX /
  325.  
  326. Switches duplex to full or half, or toggles duplex between full and half.
  327. Full duplex refers to the ability for each end to send and receive at the
  328. same time. Half duplex means that communication can only occur in one
  329. direction at a time.
  330.  
  331. However, true half duplex is almost never encountered today and the meaning
  332. of full and half duplex has changed somewhat. Full duplex is applied to
  333. host systems that echo back each character sent to them, while half duplex
  334. is the term applied to host systems that do not echo characters sent to
  335. them, thus requiring the local terminal to echo characters to the screen.
  336. By this definition, GEnie is a half duplex service, even though
  337. subscribers are connected using modern full-duplex modems.
  338.  
  339.  
  340. EDIT
  341.  
  342. This command lets you edit the current Basic program in a separate
  343. full-screen window. You can cut and paste from the clipboard and load and
  344. save the Basic program as an Ascii file or as a tokenised Basic file.
  345.  
  346.  
  347. ELSE
  348.  
  349. Only used in conjunction with the IF statement. If the condition tested in
  350. the IF statement is false, executing passes to the statement following the
  351. ELSE command. IF/ELSE/THEN/ENDIF are discussed later.
  352.  
  353.  
  354. END
  355.  
  356. Terminates executing of a Basic program. Returns to the Ready prompt. If
  357. the program is chained from a previous Basic interpeter, control returns
  358. to the previous program and continues with the statement following the
  359. CHAIN command.
  360.  
  361.  
  362. ENDIF
  363.  
  364. Marks the end of a multi-line IF ... THEN ELSE statement block. ENDIF must
  365. be the first statement on a line (it may be preceded by a label). Each
  366. ENDIF must be matched by the appropriate IF...THEN ELSE statement. Note
  367. that ENDIF is a single word. END IF is not the same as ENDIF.
  368.  
  369.  
  370. ENVIRON "aaa=bbb"
  371.  
  372. Allows you to set environment strings for use by external programs run from
  373. Basic. Environment strings are always consist of a name, followed directly
  374. by an equals sign, then the value associated with that name.
  375.  
  376. Environment strings are used by command shells, compilers, and various
  377. command line utilities. You will need to refer to the documentation of the
  378. program you want to run from Basic to determine if it uses or needs
  379. environment strings (also referred to as environment variables). However,
  380. the use of the environment on the Atari ST is not nearly as common as it
  381. is on MS-DOS systems.
  382.  
  383.  
  384. EXEC mode,"FILENAME","cmdline"
  385.  
  386. Command used to execute external programs from within Basic. This is
  387. generally used for .TTP type utility programs that may need a command line.
  388. Storm will close and delete its windows, remove its menu bar, clear the
  389. screen, hide the mouse, and display the TOS cursor before running the
  390. program. After running the program, the windows, mouse, and menu bar will
  391. be restored. A few ill-behaved programs may leave the system or mouse in an
  392. unknown state. With TOS 1.4 and later, Storm uses the GEM wind_new call
  393. which should clean up after these programs. For earlier TOS versions, Storm
  394. will try to set the mouse to a known state using published line a
  395. variables, and destroy any replacement desktop. However, Storm will not
  396. attempt to close any open windows, in case they were left open by a desk
  397. accessory.
  398.  
  399. Note that executing an external program during a file transfer may cause
  400. the file transfer to eventually time out. In general, you should not
  401. execute an external program during a file transfer.
  402.  
  403. With programs that don't require a command line, just use "" as the command
  404. line argument.
  405.  
  406. Mode should be 0 for all GEM versions except MultiTOS. With MultiTOS you
  407. can use a mode of 100 to launch a program and then keep Storm running
  408. without waiting for the program to exit. Both programs will multitask when
  409. using mode 100.
  410.  
  411.  
  412. FAST ON
  413. FAST OFF
  414.  
  415. Normally Storm Basic checks for GEM events after each Basic statement. FAST
  416. ON disables this event checking, except when executing a GOTO, GOSUB or any
  417. other command that causes control to switch to another line. This increases
  418. the speed of execution, however you cannot abort the program, switch to
  419. another window, or use any GEM features while FAST is in effect. This is
  420. not quite as restrictive as it sounds. Most programs do contain statements
  421. that switch control to another line. Also, during WAIT, PAUSE, INPUT,
  422. KEYINPUT, DLOAD, ULOAD, and POPUP commands full GEM event handling occurs
  423. because Basic is in a suspended state during those commands.
  424.  
  425.  
  426. FKEY nnn,"string"
  427.  
  428. Assigns a string to a function key or Alt key. The number n specifies
  429. which key is affected.
  430.  
  431.     For function keys F1 to F10 use the numbers 1 through 10.
  432.     For Shifted function keys F1 to F10, use the numbers 11 through 20.
  433.     The cursor keys numbers are as follows:
  434.     51 is Up        55 is Shift-Up
  435.     52 is Down      56 is Shift-Down
  436.     53 is Right     57 is Shift-Right
  437.     54 is Left      58 is Shift-Left
  438.  
  439. The reason the cursor keys are fairly high numbers is in case I decide to
  440. add support for control and alt function keys in the future.
  441.  
  442. To assign a string to a key and have it interpreted as a Basic command,
  443. add 200 to the key number,for both function keys and cursor keys.
  444.  
  445. If you need to use quotation marks (") inside a function key definition,
  446. CHR$(34) can be used for this purpose.
  447.  
  448. Example:
  449.  
  450. FKEY 201,"PRINT "+CHR$(34)+"This is F1"+CHR$(34)
  451.  
  452. defines (Basic) function key F1 as the Basic command: PRINT "This is F1"
  453.  
  454. To define ALT-key macros with this command, use the Ascii key value as the
  455. key number.
  456.  
  457. Example:    FKEY ASC("A"),"BAUD 1200"
  458.  
  459. Rather than look up the Ascii key value of "A" in a table, let Basic do
  460. the calculation for you with the ASC function which returns the Ascii
  461. value of a letter.
  462.  
  463. It is also possible to define an ALT-key macro which is NOT a Basic
  464. command, something which you can't do with the Alt-Key dialog. Just use
  465. the Ascii value of the lower case key.
  466.  
  467. Example:    FKEY ASC("a"),"This is Alt A"
  468.  
  469.  
  470. FOR
  471.  
  472. Statement starting a FOR ... NEXT loop. There is one peculiarity of FOR
  473. NEXT statements in Storm Basic. The loop will always execute at least
  474. once, no matter what the start and end values are set to.
  475.  
  476.  
  477. GEM mode,"FILENAME","cmdline"
  478.  
  479. GEM is similar in effect to EXEC, except that it leaves the mouse on and
  480. doesn't turn the TOS cursor on. A command line is still required. A few
  481. GEM programs will accept a command line.
  482.  
  483. Most GEM programs require the current path and drive to be set to their home 
  484. directory in order to load their resource files. You should use the Basic CD 
  485. command to set the appropriate path before using GEM OR pass a fully specified 
  486. filename, which will cause Storm to set the current path and drive to that 
  487. path. Storm will save and restore the previous path and drive when executing 
  488. this command.
  489.  
  490.     Notes on GEM and EXEC with MultiTOS.
  491.  
  492. The behaviour of GEM and EXEC with MultiTOS is different from regular TOS.
  493. Windows are NOT closed because it is possible to launch another program
  494. and then continue to run Storm.
  495.  
  496. GOSUB label
  497.  
  498. Jumps to a subroutine at the indicated label. The label must exist or an
  499. error will occur at run time. Line numbers are not required in Storm
  500. Basic, though Storm Basic will accept line numbers. Return from a
  501. subroutine is by means of the RETURN statement. If you do wish to exit
  502. from a GOSUB without using the RETURN statement, you should use the POP
  503. statement to remove the return address from the Basic stack.
  504.  
  505. GOTO label
  506.  
  507. GOTO transfers control unconditionally to a line with the indicated label.
  508. If the label doesn't exist, an error will occur at run time.
  509.  
  510. HELP topic
  511.  
  512. Searches the HELP.INI file for information on a topic and prints any help
  513. information in the Basic window. There is no need to use quote marks
  514. around the topic name. You cannot have any other Basic commands on the
  515. same line as the Help command. HELP HELP lists the available help topics.
  516.  
  517. HELP.INI is the help file. It is like the other profile files in that each
  518. help topic is enclosed in square brackets. However, the text between each
  519. topic is plain Ascii text. The only restriction is that help text should
  520. not start with a square bracket so it won't be mistaken for a new topic.
  521. Help topics MUST be all uppercase in the HELP.INI file.
  522.  
  523. You can edit the HELP.INI file in Storm and customize it as you wish. If
  524. you don't want online help, just delete or rename HELP.INI.
  525.  
  526.  
  527. IF
  528.  
  529. Starts a conditional statement. There are two forms of the IF statement in
  530. Storm Basic. The first form is the single line form. Example:
  531.  
  532.     IF X > 10 THEN PRINT "X > 10" ELSE PRINT "X <= 10"
  533.  
  534. The IF statement requires a THEN statement at all times. The THEN statement can 
  535. be followed by any Basic statement, or by a line label. You can also use the 
  536. ELSE statement after the IF THEN block to indicate what action to take if the 
  537. condition tested by the IF statement is false. The ELSE statement can also be 
  538. followed by a line label.
  539.  
  540. Note that if a line label follows a THEN or ELSE statement, no GOTO is 
  541. required. Also, any statement following the line label will be ignored because 
  542. control has already been transferred to the new line.
  543. e.g.
  544.  
  545.     IF X > 10 then Label:print "This never gets executed"
  546.  
  547. The second form is the multiline IF THEN ELSEIF statement:
  548.  
  549. IF expr THEN
  550. {statements}
  551. ...
  552. ELSE
  553. {statements}
  554. ...
  555. ENDIF
  556.  
  557. In the multiline IF/THEN statement, the IF must be the first statement in
  558. the line and the THEN must be the last statement, to be recognized as
  559. starting a multi-line IF/THEN sequence. (However, a label and/or spaces
  560. may appear before the IF.)
  561.  
  562. The ELSE and ENDIF also must appear at the start of a line. (May be
  563. preceded by a label and/or spaces.)
  564.  
  565. IF/ELSE/ENDIF may be nested. An ELSE or ENDIF without a matching IF will
  566. be flagged as a syntax error.
  567.  
  568. Note:The 'ELSE IF' statement is NOT supported in Storm Basic.
  569.  
  570.  
  571. INPUT variable
  572. INPUT "prompt";variable
  573.  
  574. Prompts the user for input in the Basic window. The standard prompt is a
  575. question mark. You can add an optional quoted string which will appear in
  576. front of the question mark. While Storm is waiting for input, all other
  577. program functions can be accessed. You can even switch away from the Basic
  578. window to another window. Event trapping is disabled during INPUT
  579. processing.
  580.  
  581. 'Variable' can be any Basic variable, including an array reference.
  582.  
  583. INPUT #n,variable
  584.  
  585. This form of the INPUT command is for reading data from a file into a
  586. Basic variable. 'n' represents a valid file number The file must
  587. previously been opened with the Basic OPEN command. Using an invalid file
  588. number causes an error.
  589.  
  590.  
  591. KEYINPUT X$
  592.  
  593. Waits for you to press a key in the terminal window and then returns that
  594. key in the string variable. Works only in the terminal window. However, if
  595. you are using typeahead, it will return characters from the typeahead at
  596. the point that they are transmitted out the serial port.
  597.  
  598. If keyboard macros are active, KEYINPUT reports the characters in the
  599. macro one by one, rather than reporting the keystroke that generated the
  600. macro. There is no action if the keystroke doesn't generate any serial port
  601. output, e.g. unassigned function keys.
  602.  
  603. For proper operation, use TERM OFF before the KEYINPUT command to prevent
  604. missing any characters.
  605.  
  606.  
  607. KILL "filename"
  608.  
  609. Deletes the specified file(s) from the disk. Wildcards are allowed. Use
  610. caution with this command, especially with wildcards.
  611.  
  612.  
  613. LET
  614.  
  615. A seldom used keyword. Can be used in front of assigment expressions.
  616. e.g. LET x = 1
  617.  
  618.  
  619. LFEED ON
  620. LFEED OFF
  621. LFEED /
  622.  
  623. LFEED ON causes a line feed to be generated internally every time a
  624. Carriage Return character is received. LFEED OFF turns this feature off.
  625. LFEED / toggles the line feed setting between on and off.
  626.  
  627.  
  628. LINE INPUT var$
  629. LINE INPUT "prompt";var$
  630.  
  631. Reads an entire line of input from the Basic window into a string
  632. variable. You can optionally select a prompt to be displayed.
  633.  
  634.  
  635. LINE INPUT #n,var$
  636.  
  637. Reads an entire line of input from a file into a string variable. The line
  638. ends when a line feed is encountered, or 255 characters have been read,
  639. whichever comes first. You should open an Ascii file in text mode (see
  640. OPEN) for proper results using this statement.
  641.  
  642.  
  643. LIST
  644. LIST "filename"
  645. LIST label1,label2
  646. LIST label
  647. LIST by itself lists the current program in the Basic window.
  648.  
  649. LIST "filename" saves the current program to the file "filename" as an
  650. Ascii file.
  651.  
  652. LIST label1,label2 lists all Basic lines between the two labels.
  653.  
  654. List Label lists the Basic line that begins with 'label:'.
  655.  
  656.  
  657. LOAD "filename"
  658.  
  659. This loads the file "filename" into Basic. The file can either be an Ascii
  660. file or a tokenized Basic file. Storm will figure out what type of file it
  661. is automatically. Loading a file erases any other program in memory.
  662.  
  663.  
  664. LOAD CAPTURE "filename"
  665.  
  666. Loads the specified file into the capture buffer.
  667.  
  668. LOAD TERM "file.emu"
  669.  
  670. Load a terminal emulation module into Storm. Note that this just loads the
  671. terminal emulation; you need to use the MODE command if you want it to be
  672. the active emulation. There is no check to see if the emulation is already
  673. loaded. The maximum number of loaded terminal emulation modules is six,
  674. which doesn't include the built-in TTY terminal emulation.
  675.  
  676. The STORM.INI profile file section [Terminal] contains a list of currently
  677. loaded terminal emulations. e.g.:
  678.  
  679. [Terminal]
  680. Term1=C:\STORM\VT100.EMU
  681. Term0=C:\STORM\VIDTEX.EMU
  682.  
  683. There is a memory-resident profile file names ENV which contains further
  684. information about loaded terminal emulation modules. The terminal
  685. emulations are listed by emulation names:
  686.  
  687. [Terminal]
  688. Term1=VT100
  689. Term0=VIDTEX
  690.  
  691.  
  692. The following code lists currently loaded terminal emulations. Note that
  693. the built-in terminal emulation TTY is always present.
  694.  
  695. FOR i = 0 to 5
  696. x$ = "Term" + STR$(i)
  697. PRINT i;"";SET$("STORM","Terminal",x$)
  698. PRINT i;" ";SET$("ENV","Terminal",x$)
  699. NEXT i
  700. ' Current emulation is listed by name under "Current"
  701. PRINT "Current=";SET$("STORM","Terminal","Current")
  702.  
  703. LOAD XFER "file.trf"
  704.  
  705. Loads a file transfer module into Storm. There is no check to see if the
  706. same module has already been loaded. The maximum number of loaded file
  707. transfer modules is six. (This doesn't include the Ascii file transfer,
  708. which is built-in). If you want to check to see what file transfer modules
  709. are present, there are several methods.
  710.  
  711. First of all, the STORM.INI profile file section [Protocols] lists the
  712. currently loaded file transfer modules by filename. e.g.:
  713.  
  714. [Protocols]
  715. Xfer2=C:\STORM\ZMODEM.TRF
  716. Xfer1=C:\STORM\XYMODEM.TRF
  717. Xfer0=C:\STORM\BPLUS.TRF
  718.  
  719. Secondly, there is a memory-resident profile file named ENV which also
  720. contains information about loaded protocols. It contains two types of
  721. entries under the [Protocols] secton.
  722.  
  723. The first type of entry, "Xfer0=name" lists the internal protocol name.
  724. The second type, "Popup0=name" lists the individual protocol names. e.g.:
  725.  
  726. [Protocols]
  727. Xfer0=Bplus
  728. Xfer1=XYMODEM
  729. Xfer2=ZMODEM
  730. Popup0=Ascii
  731. Popup1=Xmodem
  732. Popup2=Xmodem-1K
  733. ...
  734. Popup6=Zm. Resume
  735.  
  736. Note that the first popup name is always Ascii, which is an internal
  737. protocol. There are more protocol names than modules, since a module can
  738. contain several protocols.
  739.  
  740. The following code example will list information about all loaded file
  741. transfer protocols.
  742.  
  743. FOR i = 0 to 5
  744. x$ = "Xfer" + STR$(i)
  745. PRINT i;"";SET$("STORM","Protocols",x$)
  746. PRINT i;" ";SET$("ENV","Protocols",x$)
  747. NEXT i
  748. '
  749. FOR i = 0 to 11
  750. x$ = "Popup" + STR$(i)
  751. print i;" ";SET$("ENV","Protocols",x$)
  752. NEXT i
  753.  
  754.  
  755. LOG
  756.  
  757. Acts like Basic PRINT statement, but output is goes to the capture buffer.
  758. Still has a few quirks, for example it doesn't actually update the capture 
  759. buffer display until a newline is printed. Also, the cursor is not repositioned 
  760. in the capture buffer.
  761.  
  762. LPRINT
  763.  
  764. Prints to printer port using typical Basic syntax.
  765.  
  766. MENU n1,n2
  767.  
  768. Allows a Basic program to simulate selecting a Storm menu item. n1 is the
  769. menu title index, where Desk=0, File=1, Edit=2, etc. An out of range menu
  770. title number will cause a Basic error.
  771.  
  772. n2 is the item number in the menu dropdown, with the top item being number
  773. 1. Do not count separator lines as items. e.g. "Exit" is item number 10 in
  774. menu number 1. An out of range item number will be ignored. Disabled menu
  775. items will not be executed, since they were probably disabled for a good
  776. reason! This command is useful for programming ALT key macros.
  777.  
  778. It is not possible to select desk accessories using the MENU statement.
  779.  
  780.  
  781. MERGE "filename"
  782.  
  783. Loads the file "filename" and appends it to the end of the program in
  784. memory. "filename" must be an Ascii format file, not a tokenized file.
  785.  
  786.  
  787. MID$(dest$,start[,length]) = new$
  788.  
  789. Replaces a portion of destination string with a new string.
  790.  
  791. dest$ is a string variable or a string array reference.
  792. new$ is a string which will be used to replace a portion of dest$.
  793. Length is an optional number specifying the number of characters to replace.
  794. Start is a number specifying the position where you want to start replacing.
  795.  
  796. If length is not specified, then the length of the new$ string will be
  797. used, as long as it is not longer than the dest$ string.
  798.  
  799. Note: The length of the destination string is never changed by this
  800. command; the replacement text just overwrites the specified portion of the
  801. destination string. If the new$ is shorter than length, then the length of
  802. new$ is used for replacement.
  803.  
  804.  
  805. MKDIR "dirname"
  806.  
  807. Creates a folder (directory) using the specified name. An error will occur
  808. if dirname already exists or an invalid path is specified.
  809.  
  810.  
  811. MODE "name"
  812.  
  813. Sets terminal emulations to "name", where "name" is the name of a loaded
  814. terminal emulation. No error is caused if the emulation is not found. If
  815. the terminal emulation is already the active emulation, it will be
  816. re-initialized.
  817.  
  818.  
  819. NEW
  820.  
  821. Erases the program in memory, including all variables and arrays.
  822.  
  823.  
  824. NEXT
  825.  
  826. Used in conjunction with the FOR statement. You can specify a loop
  827. variable, e.g. NEXT x, or leave it blank in which case NEXT will loop to
  828. the most recent FOR statement. You cannot use a list of variables, as in
  829. some Basics. e.g. NEXT x,y,z is not legal in Storm Basic.
  830.  
  831.  
  832. ON
  833.  
  834. ON is used for a variety of purposes. The standard usage is to change the
  835. flow of control according to the result of an expression.
  836.  
  837.  
  838. ON expr GOSUB label1,label2,label3,...
  839. ON expr GOTO label1,label2,label3,...
  840.  
  841. In these two cases, expr is any valid Basic expression, e.g. x+1, x/y or
  842. the name of a Basic variable. expr is evaluated and the result is used to
  843. determine which label to branch to. If the result is one, the first label
  844. in the list is used, if the result is two, the second label, and so forth.
  845. If the value is less than one or greater than the number of labels in the
  846. list, then control passes to the next statement.
  847.  
  848.  
  849. ON event(n) GOSUB label
  850.  
  851. Event trapping
  852.  
  853. Event trapping is a way of responding to events without having to constantly
  854. watch for them. When trapping is enabled on an event, Storm will check for the
  855. event between executing each statment and, if the event occurred, jump to a
  856. user-defined subroutine to handle the event. Multiple event traps are possible,
  857. though Storm blocks the current event from being trapped again while its trap
  858. routine is executing.
  859.  
  860. Currently there are four events you can trap for; timer, carrier detect,
  861. serial port and clipboard.
  862.  
  863. Event trapping can occur during executing of PAUSE, WAIT and KEYINPUT
  864. statements. It cannot occur during INPUT or LINE INPUT while Basic is
  865. waiting for a line of input in the Basic window or GEM functions such as
  866. POPUP, LISTBOX and FSEL$.
  867.  
  868.  
  869. ON TIMER(n) GOSUB Label
  870. TIMER ON
  871. TIMER OFF
  872. TIMER STOP
  873. TIMER CLEAR
  874.  
  875. The statement ON TIMER(10) GOSUB Label tells the computer that every ten seconds
  876. it should branch to the subroutine at line Label. The timer value is checked
  877. between execution of each statement, and also checked during WAIT, PAUSE and
  878. KEYINPUT commands.
  879.  
  880. The ON TIMER(n) gosub statement is actually a way of telling the computer
  881. to set up a timer event. To enable the event, you must also use TIMER ON.
  882. TIMER OFF disables event trapping.
  883.  
  884. TIMER STOP is actually used by Basic internally to block the timer event during
  885. event processing. It stops event processing, but doesn't reset the
  886. timer count. Use TIMER OFF to disable the timer event.
  887.  
  888. Warning: Do not reenable an event during the event subroutine. It can lead
  889. to unexpected results and may crash the program.
  890.  
  891. TIMER CLEAR is used to erase the timer event trapping completely.
  892.  
  893.  
  894. ON CARRIER(n) GOSUB Label
  895. CARRIER ON
  896. CARRIER OFF
  897. CARRIER STOP
  898. CARRIER CLEAR
  899.  
  900. Similarly, you can perform event trapping on the carrier detect signal.
  901.  
  902. ON CARRIER(1)... waits for carrier detect to become TRUE, while ON CARRIER(0)..
  903. waits for loss of carrier. However, when you return from a carrier event trap,
  904. the trap sense is automatically reversed.
  905.  
  906.  
  907. ON CLIP(n) GOSUB Label
  908. CLIP ON
  909. CLIP OFF
  910. CLIP STOP
  911. CLIP CLEAR
  912.  
  913. Clipboard event trapping lets you call a subroutine each time the user
  914. copies or cuts text to the clipboard from a STORM window.
  915.  
  916. ON CLIP(n) selects clipboard trapping. The numeric parameter selects what
  917. type of clipboard selection to trap. CLIP(1) only traps copying from the
  918. terminal screen. CLIP(2) traps copying from the capture buffer window.
  919. CLIP(4) traps copying from any editing window, including the typeahead
  920. buffer and the capture buffer.
  921.  
  922. As noted above, it is possible to have all events enabled simultaneously.
  923. You can also use WAIT or PAUSE or KEYINPUT during an event handling subroutine.
  924. As an example, you could have a PAUSE while executing a timer event
  925. subroutine. If a carrier event occurred during the pause, the carrier event
  926. subroutine would be executed, then the PAUSE would continue, then eventually
  927. the main program would continue.
  928.  
  929. It is possible to short-circuit an event subroutine and jump to another
  930. line in the program. You should clear the event, use the POP statement to
  931. clean up the Basic stack, then GOTO to continue. If you want to continue
  932. the event trapping after this, you should re-enable the event completely
  933. by executing an ON event(n) GOSUB statement.
  934.  
  935. One reason you might do this is if you had a carrier event enabled to
  936. detect loss of carrier during an online session. If carrier is dropped,
  937. you would not want to continue executing statments which wait for the other
  938. end to respond.
  939.  
  940. If you forget the RETURN at the end of the event subroutine, execution will
  941. continue with the next line. If the event subroutine is at the end of the
  942. program, the program will end with no warning.
  943.  
  944. More on event trapping.
  945.  
  946. When an event trap jumps to a subroutine, it first saves the state of any
  947. WAIT, PAUSE, or KEYINPUT in progress. While in the event subroutine, no
  948. checking will be done for the pending WAIT, PAUSE, etc. However, you are
  949. free to use WAIT, PAUSE, or KEYINPUT during an event subroutine. When the
  950. event subroutine returns, the original WAIT, PAUSE, or KEYINPUT will be
  951. restored and can continue.
  952.  
  953. If you set TERM OFF in your main program, then TERM will be off in the
  954. event subroutine unless you explicitly turn it on with TERM ON, or implicitly 
  955. turn it on with a WAIT or PAUSE or KEYINPUT.
  956.  
  957.  
  958. ON COM(0) GOSUB Label
  959. COM ON
  960. COM OFF
  961. COM STOP
  962. COM CLEAR
  963.  
  964. Use ON COM(0) to set up an event trap for the serial port. Whenever characters 
  965. are available at the serial port, the specified subroutine is
  966. executed. You should use COMINPUT in the event subroutine to empty the
  967. serial port otherwise the event subroutine will be executed repeatedly.
  968.  
  969.     COM ON enables the event trap.
  970.     COM OFF disables the event trap.
  971.     COM CLEAR removes the event trap.
  972.  
  973.  
  974. OPEN "mode",#n,"filename"
  975.  
  976. Opens a file in Basic. n is a digit from 1 to 15 which is the file number
  977. that is used in subsequent input # or print # commands.
  978.  
  979. "mode" actually uses C language syntax. "mode" can be one of the following:
  980.     "w" creates a text file for writing, discards previous contents.
  981.     "r" opens a text file for reading.
  982.     "a" append; opens or creates a text file for writing at end of file.
  983.     "r+" opens text file for update (reading or writing).
  984.     "w+" creates text file for update, discards previous contents.
  985.  
  986. Adding a "b" to mode, e.g. "wb" opens the file in binary mode. Text mode is
  987. supposed to do CR->CR/LF translation so that a CR-LF combination in the file
  988. is replaced with a single line feed character when you read from the file,
  989. e.g. with LINE INPUT #n. When writing to a file in text mode, a carriage
  990. return is written as a carriage return followed by a line feed.
  991.  
  992.  
  993. PARITY ODD
  994. PARITY EVEN
  995. PARITY NONE
  996.  
  997. Sets parity for the serial port, odd, even, or no parity. Word size is
  998. automatically set to 8 bits for no parity, 7 bits for even or odd parity.
  999.  
  1000.  
  1001. PAUSE nn
  1002.  
  1003. Pauses execution for nn seconds. While the pause is in effect you are able
  1004. to switch away from the Basic window. Terminal operation continues during
  1005. the pause. Specifying -1 for the pause value generates the absolute
  1006. maximum pause, which is over ten million seconds (about 124 days). Event
  1007. trapping is enabled during PAUSE. The terminal window continues to receive
  1008. and display characters if TERM is set to ON.
  1009.  
  1010.  
  1011. PLAY string$
  1012.  
  1013. Uses the GEM Xbios function Dosound call. The sound values must have been
  1014. read into a string variable or string array variable. A number of programs
  1015. available through online services are able to generate appropriate data
  1016. values for the Dosound function. Unfortunately, if the keyclick sound is
  1017. enabled, pressing any key will abort Dosound. The same is true if the
  1018. system bell sound is enabled and it is sounded. You should not alter the
  1019. string variable contents while the sound is playing or unexpected results
  1020. may occur.
  1021.  
  1022.  
  1023. POP
  1024.  
  1025. Pops a return value from the Basic runtime stack. Each time you call GOSUB
  1026. or start a WHILE loop six bytes of return information are put on the Basic
  1027. runtime stack. Exiting from a subroutine or WHILE loop by means of GOTO
  1028. leaves this information on the stack. The stack will keep growing in this
  1029. situation until you run out of memory. Use of POP is recommended to keep
  1030. the stack small. You can also use POP if you exit from within a FOR/NEXT
  1031. loop using a GOTO. This also leaves information on the stack. However, when
  1032. you start a new FOR/NEXT loop with the same loop variable, any old
  1033. reference to the same variable is removed from the stack automatically.
  1034.  
  1035.  
  1036. PRINT
  1037.  
  1038. Basic Print statement. Uses typical Basic syntax. However, PRINT USING is
  1039. not supported. Neither is TAB(n) supported. Semicolons or commas are
  1040. ALWAYS required between items to be printed.
  1041.  
  1042.  
  1043. PRINT #n
  1044.  
  1045. PRINT #n prints to a file where n is a file number of a file previously
  1046. opened with the OPEN command. However, PRINT #0 will print directly to the
  1047. terminal screen. PRINT #0 sends text to the terminal screen using the
  1048. current terminal emulation, so that you can use escape sequences and other
  1049. terminal emulation features. Text displayed in this manner is not sent out
  1050. the serial port, nor is it detected by the WAIT or KEYINPUT commands. No
  1051. linefeeds are added unless you use LFEEDS ON.
  1052.  
  1053.  
  1054. READ var,var$,var(n),var$(n)
  1055.  
  1056. Reads an item from a DATA statement into a Basic variable. You can read
  1057. into any variable or array variable. Attempting to read a string value
  1058. into an integer variable will cause an error. However, you can always read
  1059. an integer value into a string variable; it just gets converted into the
  1060. ascii representation of the value.
  1061.  
  1062.  
  1063. REM
  1064.  
  1065. Indicates a Basic comment. You can also use ' to start a comment.
  1066.  
  1067.  
  1068. REPLACE$(dest$,start[,length]) = new$
  1069.  
  1070. Replace$ is a lot like MID$, except that it will expand or shrink the
  1071. destination string. This means you can replace a part of string with a
  1072. string that is a different length. Used REPLACE$ in place of awkward
  1073. left$+"xxx"+right$ constructions to alter strings.
  1074.  
  1075. Example: Generic replacement of "Street" with "St."
  1076.     a$ = "336 Queen Street South"
  1077.     ...
  1078. ' Assume we don't know where "Street" starts or what case it's in.
  1079. ' Use UCASE$ to create a copy of a$ that is uppercased.
  1080. ' Search for "STREET" and replace in original a$ with "St."
  1081.     x = instr(UCASE$(a$),"STREET")
  1082.     if x then replace$(a$,x,6) = "St."
  1083.     print a$
  1084.  
  1085. This changes a$ to "336 Queen St. South". If you don't specify the
  1086. replacement length, then it defaults to the length of that portion of the
  1087. destination string from 'start' to the end of the string. e.g. in the
  1088. above example, REPLACE$(a$,x) = "St." would change a$ to "336 Queen St.".
  1089.  
  1090. Something like REPLACE$(a$,x,y) = "" is also permitted. It deletes the
  1091. specified portion of the destination string.
  1092.  
  1093.  
  1094. RESTORE
  1095. RESTORE label
  1096.  
  1097. RESTORE by itself resets the data pointer for subsequent READ operations
  1098. to the start of the Basic program. You can use an optional label to
  1099. restore the data pointer to a specific line.
  1100.  
  1101.  
  1102. RETURN
  1103.  
  1104. Returns from a GOSUB call.
  1105.  
  1106.  
  1107. RMDIR "dirname"
  1108.  
  1109. Deletes a subdirectory (folder). You cannot delete a subdirectory that
  1110. contains files. You must delete all the files first.
  1111.  
  1112.  
  1113. RUBOUT ON
  1114. RUBOUT OFF
  1115. RUBOUT /
  1116.  
  1117. Sets the terminal Destructive Backspace setting. RUBOUT ON means that
  1118. backspace characters (Ascii 8) received by the terminal cause the previous
  1119. character on a line to be erased, unless the cursor is already in column
  1120. zero, in which case nothing happens.
  1121.  
  1122. RUBOUT / toggles the state of Destructive Backspace.
  1123.  
  1124. RUN
  1125. RUN "filename"
  1126.  
  1127. RUN by itself just runs the program in memory. RUN "filename" loads a new
  1128. program and then runs it. The program can be a tokenized Basic program or
  1129. an Ascii Basic program.
  1130.  
  1131. RUN always zeros variables and strings before the program starts.
  1132.  
  1133.  
  1134. SAVE "filename"
  1135.  
  1136. Saves the program in memory as a tokenized Basic file. This is a more
  1137. compact format than Ascii, though it can only be read and understood by
  1138. Storm Basic. Tokenized files also load faster than Ascii files.
  1139.  
  1140.  
  1141. SAVE CAPTURE "filename"
  1142.  
  1143. Saves the capture buffer to the indicated filename. If you want to be
  1144. prompted with a file selector, use SAVE CAPTURE FSEL$("","").
  1145.  
  1146.  
  1147. SBITS 1
  1148. SBITS 2
  1149. SBITS 3
  1150.  
  1151. Sets the number of stop bits used by the serial port. SBITS 3 actually
  1152. sets stop bits to one and a half (1.5) stop bits.
  1153.  
  1154.  
  1155. SEND
  1156.  
  1157. Acts the same as PRINT, except output is to the serial port instead of the
  1158. Basic window. As with PRINT, SEND will automatically add a carriage return
  1159. unless you end the statement with a semicolon or comma. You can send any
  1160. control characters using SEND, including Ascii 0, by using CHR$(n). If 
  1161. half-duplex is set, characters will be echoed to the terminal screen.
  1162.  
  1163. SET
  1164. Used to set profile file settings. The current profile files are:
  1165.  
  1166. STORM.INI        Used for all Storm terminal settings.
  1167. STORMKEY.INI    Used to set keyboard macros.
  1168. DIALDIR.INI        The dial directory.
  1169.  
  1170. The profile files are Ascii text files separated into sections. Each
  1171. section is labelled with a name inside square brackets, followed by a
  1172. number of entries of the type Setting=Value.
  1173.  
  1174. Value can be an integer value or a string, or a quoted string. Profile
  1175. files are loaded into memory when Storm runs and are saved when you exit,
  1176. or can be saved manually from the menu bar. Some items in the profile file
  1177. are only accessed when you first run Storm, others are accessed
  1178. constantly.
  1179.  
  1180. e.g. Keyboard macros are always retrieved from the STORMKEY.INI file in
  1181. memory. Serial port settings are only retrieved from the profile file
  1182. initially, though the profile settings are kept up to date each time the
  1183. serial port settings are modified. Full documentation on the profile files
  1184. will come at a later date.
  1185.  
  1186. Example: to set the download path use:
  1187.  
  1188. SET "STORM","Paths","DownloadPath","F:\DOWNLOAD\"
  1189.  
  1190. The first string is the profile file name, minus the extension. The second
  1191. string is the section name, the third string is the name of the item to be
  1192. modified. The fourth string is the new value of the item. The fourth item
  1193. can be a string or a integer. If the string contains control codes or begins 
  1194. with a quote character ("), it is automatically quoted and control codes 
  1195. converted into standard C language escape sequences.
  1196.  
  1197. e.g. Ascii 10 becomes \n, Ascii 27 becomes \33, Ascii 127 becomes \177
  1198.  
  1199. You can create your own sections in the profile files for your own
  1200. purposes and they will be created if they don't already exist.
  1201.  
  1202. Currently only the predefined Storm profile files "STORM.INI",
  1203. "STORMKEY.INI","DIALDIR.INI", and "HELP.INI" are fully supported.
  1204.  
  1205. You can specify another profile file name and access entries in it, but it
  1206. will exist only in memory. It will not be loaded (even if it exists) and it
  1207. will not be saved to disk.
  1208.  
  1209. Profile sections items are case-sensitive. You must type the names exactly as 
  1210. they appear in the profile file.
  1211.  
  1212.  
  1213. STOP
  1214.  
  1215. Stops the program. You can restart the program with CONT. Variables remain
  1216. unaffected.
  1217.  
  1218.  
  1219. STRIP ON
  1220. STRIP OFF
  1221. STRIP /
  1222.  
  1223. Sets whether the high bit is masked off when reading from the serial port.
  1224. Useful when connecting to a system transmitting parity when you have
  1225. parity off. STRIP / toggles the current setting.
  1226.  
  1227.  
  1228. TA ON
  1229. TA OFF
  1230. TA /
  1231.  
  1232. Turns typeahead on or off, or toggles the state of typeahead. When
  1233. typeahead is turned on, a cursor is displayed in the typeahead window and
  1234. you can enter text there.
  1235.  
  1236.  
  1237. TERM ON
  1238. TERM OFF
  1239.  
  1240. Normally, when Storm and Basic are running, the terminal window and Basic
  1241. program execution proceed in parallel. This means that under some
  1242. circumstances, you can miss a string you are waiting for because Basic is
  1243. executing another line of code while the terminal is processing serial
  1244. input. So when a WAIT statement comes up again, the string has already
  1245. been processed by the terminal.
  1246.  
  1247. This is only a problem when the strings are separated by very short
  1248. pauses. In order to cure this, you can use the TERM statement to shut off
  1249. terminal processing except during WAIT statements. This will guarantee that
  1250. every single character that comes in the serial port will get checked by
  1251. the WAIT statement. If that's what you want, use TERM OFF where you want
  1252. strict serial port checking to start, and TERM ON where you don't really
  1253. care.
  1254.  
  1255. TERM is ON by default and is automatically turned back on when a Basic
  1256. program is stopped or ends. It is also turned on during WAIT, PAUSE, and
  1257. KEYINPUT commands.
  1258.  
  1259. For example, if you want to catch prompts between each message at 9600
  1260. baud, use TERM OFF. If you only want to catch the prompt at the end of a
  1261. process that will take a while, leave term on.
  1262.  
  1263.  
  1264. TIMER ON
  1265. TIMER OFF
  1266. TIMER STOP
  1267. TIMER CLEAR
  1268.  
  1269. See description of timer events under event trapping.
  1270.  
  1271. TOPW
  1272. TOPW n
  1273.  
  1274. TOPW by itself brings the Basic window to the top. TOPW followed by a
  1275. number brings the specified window to the top. The window number is based
  1276. on the Windows menu dropdown.
  1277.  
  1278.     1 is the Terminal window
  1279.     2 is the Capture window
  1280.     3 is the Basic window
  1281.     4 through 10 are editing windows (only topped if actually open)
  1282.     11 is the file transfer window (only topped if open)
  1283.  
  1284.  
  1285. TRAP label
  1286.  
  1287. Generates an error trap so that when a Basic error occurs, Basic will do a
  1288. gosub to the label in the trap statement. Currently return from the trap
  1289. routine should be by a RETURN statement to continue execution by
  1290. re-executing the statment that generated the error. Or, you can do a POP
  1291. statement to pop the return off the stack and then GOTO any other line.
  1292.  
  1293. ERR(0) returns the Basic error number (listed elsewhere). ERR(1) returns
  1294. the line number in which the error happened. Line numbers for this purpose
  1295. start at one for the first line in the file.
  1296.  
  1297. After the trap routine is entered, you need to reset the trap handler with
  1298. another TRAP statement before proceeding.
  1299.  
  1300.  
  1301. TRON
  1302. TROFF
  1303.  
  1304. Turn tracing on or off. This can be done inside a program, from the Ready
  1305. prompt, or the Basic menu dropdown. When tracing is enabled, line numbers
  1306. inside square brackets are printed as each line is executed.
  1307.  
  1308. As with the TRAP statement, Basic programs are numbered sequentially,
  1309. starting at line one.
  1310.  
  1311.  
  1312. TYPE
  1313.  
  1314.  
  1315.  
  1316. UNLOAD XFER "name"
  1317. UNLOAD TERM "name"
  1318.  
  1319. Unloads a file transfer (XFER) or terminal emulation (TERM) from memory.
  1320. Use the name that appears in the Terminal Emulations or Transfer Protocols
  1321. dialog box. e.g "VT100" or "ZMODEM". See "LOAD XFER" and "LOAD TERM" for
  1322. code showing how to find the names of currently loaded file transfers and
  1323. terminal emulations.
  1324.  
  1325. Note that unloading a terminal emulation sets emulation to the default TTY
  1326. emulation. Be sure to reset terminal emulation with the MODE command
  1327. afterwards. If the module is not found, no error occurs.
  1328.  
  1329.  
  1330. WAIT nn,"string"[,"string",...]
  1331.  
  1332. This is the most important command for automated operation. You can wait
  1333. for multiple strings with a timeout value (in seconds). Basic will match
  1334. characters coming in the serial port with the strings and continue with the
  1335. next statement when either the string is matched, or a timeout occurs.
  1336. Naturally, all program functions are enabled while the wait is in
  1337. progress.
  1338.  
  1339. A timeout value of -1 waits forever (actually, about 124 days).
  1340.  
  1341. Once the WAIT statment has executed, use the WAIT(0) function to determine
  1342. the result.
  1343.  
  1344. WAIT(0) returns 0 if there was a timeout, otherwise it returns the string
  1345. number that was matched, starting at 1 for the first string. So you could
  1346. use ON WAIT (0) GOSUB 100,200,300,etc.
  1347.  
  1348.  
  1349. WHILE expr
  1350.     statements
  1351. WEND
  1352.  
  1353. While the expression evaluates to TRUE, executes the statements inside the
  1354. loop. If the expression is FALSE, skips to the next statement past the
  1355. WEND statement. A WHILE/WEND block can span multiple lines and can begin or
  1356. end in the middle of a line.
  1357.  
  1358.  
  1359. ===========================================================
  1360.  
  1361. Basic functions and operators
  1362.  
  1363. Functions in Storm Basic generally take a set of arguments and return
  1364. a value. Functions whose name ends in a dollar sign ($) returns a
  1365. string value. All other functions return a numeric value. All numbers
  1366. in Storm Basic are 32-bit signed values.
  1367.  
  1368. Certain keywords like CLIP$, CARRIER, and CSRLIN return a value but,
  1369. unlike true functions, have no arguments.
  1370.  
  1371. ABS(n)
  1372.  
  1373. Basic function returns the absolute value of a single numeric argument.
  1374.  
  1375.  
  1376. ALERT(1,"[1][alert][OK]")
  1377.  
  1378. Lets you display a standard GEM alert box. The number is the number of the
  1379. default button. The string must be a proper GEM alert string. No checking
  1380. is done of the string. The return value is the number of the button that
  1381. was selected.
  1382.  
  1383.  
  1384. AND
  1385.  
  1386. Performs a bitwise Boolean AND operation between two numeric values.
  1387.  
  1388.  
  1389. ASC("x")
  1390.  
  1391. Function which returns the Ascii value of the first letter of a string
  1392. parameter.
  1393.  
  1394.  
  1395. CAP$(n)
  1396.  
  1397. String function which returns a line of text from the capture buffer. The
  1398. numeric parameter indicates which line to return. The first line of the
  1399. capture buffer is line number one. An out of range number will return an
  1400. empty string. A blank line will also return an empty string. The line of
  1401. text is not terminated by a carriage return or line feed.
  1402.  
  1403.  
  1404. CAPTURE
  1405.  
  1406. Returns TRUE if Capture is enabled, otherwise FALSE. No parameters are
  1407. required. e.g. PRINT CAPTURE will print -1 if Capture is enabled or 0 if it
  1408. is not.
  1409.  
  1410.  
  1411. CARRIER
  1412.  
  1413. Returns TRUE if the carrier detect signal on the serial port is on,
  1414. otherwise returns FALSE. No parameters are required. This function works
  1415. on all TT, MegaSTE and Falcon serial ports
  1416.  
  1417. CHR$(n)
  1418.  
  1419. Returns a string consisting of a single character with the Ascii value of
  1420. the numeric parameter.
  1421.  
  1422.  
  1423. CAPTURE CLEAR
  1424.  
  1425. Clears the capture buffer.
  1426.  
  1427.  
  1428. CLIP$
  1429.  
  1430. CLIP$ returns the contents of the clipboard. If the clipboard is empty,
  1431. CLIP$ returns the empty string "". The maximum size of CLIP$ is 65535
  1432. bytes.
  1433.  
  1434. CLIP$ can consist of multiple lines, separated by a line feed character.
  1435. Even if you select a single letter, the program will still add a line feed
  1436. to it, so always be prepared to strip out the line feed character, e.g.
  1437. with RTRIM$.
  1438.  
  1439.  
  1440. CSRLIN
  1441.  
  1442. Returns the terminal screen cursor row location. No parameters required.
  1443. The top line of the terminal screen is line 1.
  1444.  
  1445.  
  1446. DATE$
  1447.  
  1448. DATE$ returns the date as a string in the format mm-dd-yyyy
  1449.  
  1450.  
  1451. DFREE("A")
  1452.  
  1453. Returns free space on a drive. The parameter is a string consisting of
  1454. drive letter you want information on.
  1455.  
  1456.  
  1457. DLOAD("protocol","file",...)
  1458.  
  1459. Example:  x = DLOAD("XMODEM","FILE")
  1460.  
  1461. This downloads the file "FILE" using the Xmodem protocol. The 'x' will
  1462. contain the number of files actually transferred, in this case '1' if
  1463. successful, '0' if there was an error. If you omit the filename, the
  1464. protocol module will automatially put up a file selector if required by
  1465. that protocol. If you abort the transfer, the return value will be 0. If
  1466. you abort the Basic program, the file transfer will continue.
  1467.  
  1468. Protocol names should be the same names as listed when downloading via the
  1469. File menu. Upper and lower case are not significant. Basic will search
  1470. through the list of available protocols. If the protocol is not found, a
  1471. Basic error will result.
  1472.  
  1473. You can use multiple filenames, but non-batch protocols, e.g. xmodem, will
  1474. only transfer the first file. Wildcards are NOT permitted in the
  1475. filenames. However, you could expand wildcards using the Basic functions
  1476. FSFIRST$ and FSNEXT$.
  1477.  
  1478.  
  1479. DRVMAP$
  1480.  
  1481. Returns a string with letters indicating which drives are available on the
  1482. system. e.g. "ABCDE" indicates drives A through E. The letters are always
  1483. uppercase. Note that 'A' and 'B' can both be present, even if the system
  1484. has only a single floppy drive because GEM can simulate drive B
  1485. internally.
  1486.  
  1487.  
  1488. ENVIRON$("name")
  1489.  
  1490. Returns the value of an environment variable. The parameter is the name of
  1491. the environment variable (environment string) you want information about.
  1492. A nonexistent variable returns an empty string.
  1493.  
  1494.  
  1495. EOF(n)
  1496.  
  1497. Returns TRUE of the end of a file has been reached. Used when reading a
  1498. file to detect the end of the file. 'n' is the file number.
  1499.  
  1500.  
  1501. ERR(0)
  1502.  
  1503. Returns the Basic error number of the most recent Basic error.
  1504.  
  1505. Current error numbers and error messages:
  1506.  
  1507. 0   "Unknown Error" (or no error at all)
  1508. 1   "Expression too complex"
  1509. 2   "Invalid NEXT"
  1510. 3   "NEXT without FOR"
  1511. 4   "Invalid RETURN"
  1512. 5   "Out of data on READ"
  1513. 6   "Illegal parameters"    (fairly generic error)
  1514. 7   "No more variables (max 128)"
  1515. 8   "Out of memory"
  1516. 9   "Undefined line number"
  1517. 10  "Subscript out of range"
  1518. 11  "Attempt to redimension"
  1519. 12  "Out of string space"
  1520. 13  "Bad load file format"
  1521. 14  "File I/O error"
  1522. 15  "Can't open file"
  1523. 16  "Can't write file"
  1524. 17  "Can't read file"
  1525. 18  "Stack Underflow"
  1526. 19  "Divide by zero"
  1527. 20  "ELSE without IF"
  1528. 21  "WHILE without WEND"
  1529. 22  "WEND without WHILE"
  1530. 23  "Syntax errors during load"
  1531. 24  "Error token encountered"
  1532. 25  "String too large"
  1533. 26  "Badly formed label"
  1534. 27  "Duplicate Label"
  1535. 28  "Wrong Data Type"
  1536. 29  "ENDIF must be at start of line"
  1537. 30  "IF must be at start of line"
  1538. 31  "ENDIF without block if"
  1539. 32  "ELSE without block if"
  1540.  
  1541.  
  1542. ERR(1)
  1543.  
  1544. Returns the line number where the last error occurred. Basic programs are
  1545. numbered internally starting at line 1.
  1546.  
  1547.  
  1548. FRE(n)
  1549.  
  1550. Because Basic allocates and deallocates memory as needed, most FRE calls
  1551. return how much memory is used, not how much is free. Most of these values
  1552. are only useful for debugging purposes.
  1553.  
  1554. FRE(3) returns the number of characters waiting in the serial buffer. It
  1555. is somewhat useful when figuring out if you are at a prompt, but not 100%
  1556. effective with time-sharing systems, where long pauses are not uncommon.
  1557.  
  1558. FRE(2) returns the number of bytes in the capture buffer. It does this by
  1559. counting the number of characters in each line. It does not take account
  1560. of any overhead used to keep track of the capture buffer.
  1561.  
  1562. FRE(1) returns the number of lines in the capture buffer. It will always be
  1563. at least 1, because there is always at least a single blank line.
  1564.  
  1565. FRE(0) returns the largest available free memory block in the system, that
  1566. is, the result of calling Malloc(-1L)
  1567.  
  1568. FRE(-1) returns total space used for strings (not including system
  1569. overhead).
  1570.  
  1571. FRE(-2) returns the total number of string slots currently allocated. This
  1572. is never less than 16.
  1573.  
  1574. FRE(-3) returns the number of strings currently in use.
  1575.  
  1576. FRE(-4) returns the number of bytes used for storing the current program
  1577. statements.
  1578.  
  1579. FRE(-5) returns the size in bytes of the variable name table. Each
  1580. variable name is stored as a null-terminated string. There are two extra
  1581. null bytes to mark the end of the table.
  1582.  
  1583. FRE(-6) returns the size in bytes of the variable value table. Each
  1584. variable takes 8 bytes of storage.
  1585.  
  1586. FRE(-7) returns the size in bytes of the array table. Each element of an
  1587. array takes 4 bytes in this table.
  1588.  
  1589. FRE(-8) returns the size of the run-time stack. This is typically 64
  1590. bytes, unless you have very deeply nested loops.
  1591.  
  1592. FRE(-9) returns the number of labels in the label table.
  1593.  
  1594. FRE(-10) returns the size in bytes of the label name table.
  1595.  
  1596. FRE(-11) returns the number of bytes allocated to the capture buffer. This
  1597. is usually more than the number of bytes actually used. Mostly of academic
  1598. interest.
  1599.  
  1600. Any other value inside the brackets returns the same as FRE(0).
  1601.  
  1602.  
  1603. FSEL$("path","filename")
  1604.  
  1605. Pops up the GEM file selector and returns a filename. "path" lets you specify 
  1606. the path to be displayed by the file selector. An empty path ("") will cause 
  1607. the default path to be used. A path starting with a backslash will be in the 
  1608. root of the default path's drive. A path with a colon character (:) as the 
  1609. second character is used as-is. Any other path is appended to the current path.
  1610.  
  1611. You should either end the path with the wildcard you want to use, or end it
  1612. with a backslash, in which case the default wildcard "*.*" will be added.
  1613. Or, use just a wildcard to have it added to the default path. e.g.
  1614. FSEL$("*.BAS","");
  1615.  
  1616. "filename" is the filename to be displayed in the file selector. A blank 
  1617. filename is permitted. e.g. FSEL$("","") just pops up a file selector with 
  1618. current path and default wildcard "*.*" and an initially empty filename.
  1619.  
  1620. If you select Cancel then FSEL$ returns an empty string. If you select OK,
  1621. but the filename is blank, then an empty string is returned.
  1622.  
  1623.  
  1624. FSELPATH$("path")
  1625.  
  1626. Pops up the GEM file selector and returns the path only. If you select
  1627. Cancel, it returns an empty string. "path" lets you specify a starting
  1628. path. "path" should be a full path including drive letter and should end
  1629. with a backslash, An empty path ("")  will cause the default path to be
  1630. used.
  1631.  
  1632. FSFIRST$("filespec",mask)
  1633. FSNEXT$
  1634.  
  1635. These calls are used to get a directory into string variables.
  1636.  
  1637. FSFIRST$ corresponds to the GEMDOS Fsfirst call. The filespec is a wildcard
  1638. value, which can include a full directory path. mask is an integer value
  1639. representing which files you wish to view. The mask values are:
  1640.  
  1641. 1   File is read-only
  1642. 2   File hidden from directory search
  1643. 4   File set to "system"
  1644. 8   Volume label
  1645. 16  Directory
  1646. 32  "Archive bit" meaning file has been updated.
  1647.  
  1648. Add the mask values together to generate an appropriate mask. You are best
  1649. of always specifing the "Archive bit" because you never know what state it
  1650. is going to be in. The DIR command uses a mask of  49, which is equal to
  1651. 32+16+1.
  1652.  
  1653. Note that FSFIRST$ and FSNEXT$ will return the two directory entries of '.'
  1654. and '..' which are found in every directory and are used by TOS
  1655. internally.
  1656.  
  1657. Once you call FSFIRST$, then keep calling FSNEXT$ until it returns an empty
  1658. string.
  1659. Example: This prints out the current directory.
  1660.  
  1661. PRINT FSFIRST$("*.*",31)
  1662. X = 1
  1663. WHILE X
  1664.     a$ = FSNEXT$
  1665.     IF a$ = "" THEN X = 0 ELSE PRINT a$
  1666. WEND
  1667.  
  1668. Sample output:
  1669.  
  1670. ----d-          0 1991/06/06 11:00:00 AUTO
  1671. -----a        123 1992/08/25 12:12:11 DESKTOP.INF
  1672.  
  1673.  
  1674. The first six characters are file attributes. The possible attributes (in
  1675. order of appearance) are:
  1676.  
  1677. r    =    Read Only
  1678. h    =    Hidden File
  1679. s    =    System File
  1680. v    =    Volume Label
  1681. d    =    Directory
  1682. a    =    Archive Bit
  1683.  
  1684.     Any attribute not present is replaced with a '-'.
  1685.  
  1686. The attributes are followed by a single space, then a ten character field
  1687. for the file size, then the date, time and filename as shown above. The
  1688. fixed size fields make it easy to extract desired information using the
  1689. MID$ function.
  1690.  
  1691.  
  1692. INSTR([start,]"string","key")
  1693.  
  1694. This is a string search function. It searches "string" for substring "key"
  1695. and returns the location of "key" in "string", or 0 for failure.
  1696. 'start' is optional and is the location in the string to start at. N.B. The
  1697. first location in a string is location 1. Also, no matter where you start
  1698. searching in the string, INSTR always returns an index relative to the
  1699. start of the string.
  1700.  
  1701.     Example: INSTR("12345","3") and INSTR(3,"12345","3") both return 3.
  1702.  
  1703. ISDIGIT("string")
  1704.  
  1705. Returns TRUE if the first character of the string argument is a digit.
  1706. Returns FALSE if it is not a digit.
  1707.  
  1708.  
  1709. LCASE$("string")
  1710.     Returns a copy of a string converted to all lowercase characters.
  1711.  
  1712.  
  1713. LEFT$("string",n)
  1714.     Returns a string containing the leftmost n letters of the string.
  1715.  
  1716.  
  1717. LEN("string")
  1718.     Returns the length of a string.
  1719.  
  1720.  
  1721. LISTBOX(title$,array$(n),count)
  1722.  
  1723. This is a new GEM based method of asking for user input. The listbox
  1724. displays a list of text items in a box with slider, scroll bar, arrows,
  1725. and a title. The number of items that can be used in a listbox is limited
  1726. only by Basic memory limits. The listbox call returns the index of the
  1727. item selected (starting with 1) or zero if no item was selected.
  1728.  
  1729. title$ is a string or string expression which is used as the title for the
  1730. listbox. array$(n) is the starting array location for the start of the
  1731. listbox data. Count is the number of items from the array to use in the
  1732. listbox. Count must be an integer constant or integer variable. Using an
  1733. array that is smaller than the count value may produce unexpected results!
  1734.  
  1735. When the listbox is on screen, you can move up and down the list of items
  1736. using the cursor keys or the mouse. Select an item with the mouse or by
  1737. pressing Return. Cancel by pressing Undo.
  1738.  
  1739.     Autosearch
  1740.  
  1741. The listbox has a special property such that if you press a key, it will
  1742. search forward for the next item which starts with that key. This is very
  1743. useful for large lists. I recommend that you use sorted lists to benefit
  1744. most from this feature.
  1745.  
  1746.  
  1747. LTRIM$("string")
  1748.  
  1749. Returns string, stripped of leading 'white space' characters. 'white space'
  1750. characters include space, formfeed, newline, carriage return, tab, and
  1751. vertical tab.
  1752.  
  1753.  
  1754. MID$("string",s,n)
  1755.  
  1756. Returns the substring of "string" starting at location s and continuing
  1757. for n letters. n is optional. Omitting n returns the string starting from
  1758. location s. The first letter in a string is considered to start at position
  1759. 1.
  1760.  
  1761.  
  1762. MOD
  1763.  
  1764. This is the modulus operator. It calculates the remainder obtained from an
  1765. integer division of two numbers. e.g. The result of 11 MOD 8 is 3.
  1766.  
  1767.  
  1768. NOT
  1769.  
  1770. Operator which performs a bitwise negation of a number.
  1771.  
  1772.  
  1773. OR
  1774.  
  1775. Operator which performs a bitwise OR of a number.
  1776.  
  1777.  
  1778. POPUP(n,"Title","  Item 1","  Item 2",...)
  1779.  
  1780. POPUP is a function call which displays a popup menu on the screen which
  1781. the user can select an item from. POPUP returns 0 if nothing was selected,
  1782. otherwise it returns the number of the item that was selected, starting
  1783. with 1 for the first item in the list.
  1784.  
  1785. The first value in the function call is a numeric value. If it is greater
  1786. than zero, then the corresponding menu item will be displayed with a check
  1787. mark. I sugges that you leave two leading spaces in front of each menu item
  1788. to allow room for the check mark.
  1789.  
  1790. The title is a string which is displayed at the top of the popup menu, in
  1791. its own box. It is always centered in the box and does not require any
  1792. leading or trailing spaces, but you can add them if you wish. The width of
  1793. the popup is always that of the widest item.
  1794.  
  1795. The menu items can be string variables or string array items, they do not
  1796. have to be quoted text. Popup menus are more suitable for displaying
  1797. choices than alert boxes and a lot easier to use.
  1798.  
  1799.     For large lists of items, use LISTBOX.
  1800.  
  1801. POS(0)
  1802.  
  1803. Returns the terminal screen cursor column location. The argument is a
  1804. dummy argument. It may seem odd that CSRLIN (with no argument at all) is
  1805. used for the cursor row and POS(0) (with a useless argument) is used for
  1806. the cursor column. Well, this is the way it's done on the IBM PC, so I
  1807. have just copied their way of doing things for compatibility.
  1808.  
  1809.  
  1810. PROMPT$(n)
  1811.  
  1812. This function takes up to n characters from before the current terminal
  1813. screen cursor position and returns it as a string. Doesn't go past the
  1814. beginning of the current line. Useful for getting the current prompt when
  1815. automating operations.
  1816.  
  1817.  
  1818. RIGHT$("string",n)
  1819.  
  1820. Returns the rightmost n letters of the string.
  1821.  
  1822.  
  1823. RND(n)
  1824.  
  1825. Returns a random number between 0 and 32767. If the argument is non-zero,
  1826. seeds the random number generator with that value.
  1827.  
  1828.  
  1829. RTRIM$("string")
  1830.  
  1831. Returns string, stripped of trailing 'white space' characters. 'white
  1832. space' characters include space, formfeed, newline, carriage return, tab,
  1833. and vertical tab.
  1834.  
  1835.  
  1836. SCREEN$(n)
  1837.  
  1838. Returns a line of text from terminal screen line 'linenumber'. The first
  1839. line of the screen is 1. Trailing whitespace is stripped from the line, so
  1840. a blank line is returned as an empty string "".
  1841.  
  1842.  
  1843. SET("file","section","name")
  1844. SET$("file","section","name")
  1845.  
  1846. Returns the value of an item in the specified profile file. SET returns a
  1847. numeric value, while SET$ returns a string. If the item does not exist,
  1848. then SET$ will return an empty string, while SET will return zero.
  1849.  
  1850. Current profile filenames are "STORM", "STORMKEY", "DIALDIR" and "HELP".
  1851. The ".INI" extensions are not used.
  1852.  
  1853.  
  1854. SGN(n)
  1855.  
  1856. Returns -1 if n is negative, +1 if n is positive.
  1857.  
  1858.  
  1859. SPACE$(n)
  1860.  
  1861. Returns a string of n spaces.
  1862.  
  1863.  
  1864. STR$(n)
  1865.  
  1866. Returns an string representation of a number n. e.g. STR$(9) returns "9".
  1867.  
  1868. TIME$
  1869.  
  1870. Returns the time as a string in the format hh:mm:ss
  1871.  
  1872.  
  1873. TIMER
  1874.  
  1875. Returns the time (in seconds) since the program started running. This is
  1876. actually the standard C library function clock(). Reasonably useful for
  1877. timing things.
  1878.  
  1879.  
  1880. UCASE$("string")
  1881.  
  1882. Returns a copy of a string converted to all uppercase characters.
  1883.  
  1884.  
  1885. ULOAD
  1886.  
  1887. Example:  x = ULOAD("XMODEM","FILE")
  1888.  
  1889. This uploads the file "FILE" using the Xmodem protocol. The 'x' will
  1890. contain the number of files actually transferred, in this case '1' if
  1891. successful, '0' if there was an error. If you omit the filename, the
  1892. protocol module will automatially put up a file selector if required by
  1893. that protocol. If you abort the transfer, the return value will be 0. If
  1894. you abort the Basic program, the file transfer will continue.
  1895.  
  1896. Protocol names should be the same names as listed when uploading via the
  1897. File menu. Upper and lower case are not significant. Basic will search
  1898. through the list of available protocols. If the protocol is not found, a
  1899. Basic error will result.
  1900.  
  1901. You can use multiple filenames, but non-batch protocols, e.g. xmodem, will
  1902. only upload the first file. Wildcards are NOT permitted in the filenames.
  1903. However, you could expand wildcards using the Basic functions FSFIRST$ and
  1904. FSNEXT$.
  1905.  
  1906. VAL("12345")
  1907.  
  1908. Converts an Ascii string into a (long) number.
  1909.  
  1910.  
  1911. WAIT(0)
  1912.  
  1913. WAIT(0) returns 0 if there was a timeout, otherwise it returns the string
  1914. number that was matched by the most recent WAIT statement, starting at 1
  1915. for the first string.
  1916.  
  1917.  
  1918. XOR
  1919.  
  1920. Performs an exclusive xor operation on two numbers.
  1921.  
  1922.  
  1923.     Reserved Basic keywords
  1924.  
  1925. The following Basic commands and functions are currently unimplemented but
  1926. the keywords are reserved for future expansion.
  1927.  
  1928. NOTE, POINT, GET, PUT, ECHO, HCOPY, HANGUP, and DIAL.
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.